Skip to content

Conversation

VictoriousRaptor
Copy link
Contributor

@VictoriousRaptor VictoriousRaptor commented Jul 14, 2025

Hide double pin card when use pinyin is false.

Follows on from #2427

@coderabbitai coderabbitai bot added the enhancement New feature or request label Jul 14, 2025
@VictoriousRaptor VictoriousRaptor added Dev branch only An issue or fix for the Dev branch build and removed enhancement New feature or request labels Jul 14, 2025
Copy link

gitstream-cm bot commented Jul 14, 2025

Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.

Copy link
Contributor

coderabbitai bot commented Jul 14, 2025

📝 Walkthrough

Walkthrough

A visibility binding was added to the "ShouldUseDoublePinyin" card in the settings pane, making it visible only when the "ShouldUsePinyin" property is true. This uses a custom markup extension for the visibility logic. No other controls or logic were changed. Additionally, the spelling exception list for the GitHub action was updated with nine new proper nouns. A new test class was added to benchmark and verify the correctness of Chinese character detection methods.

Changes

File(s) Change Summary
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml Added visibility binding to "ShouldUseDoublePinyin" card using the VisibleWhen markup extension.
.github/actions/spelling/expect.txt Added nine new proper nouns and brand names to the spelling exception list for GitHub action spell checks.
Flow.Launcher.Infrastructure/UserSettings/Settings.cs Fixed typo in comment: "Customizeable" to "Customizable" in RegisteredHotkeys property.
Flow.Launcher.Test/ChineseDetectionPerformanceTest.cs Added new test class for correctness and performance benchmarking of Chinese character detection methods.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SettingsPaneGeneral.xaml
    participant ViewModel

    User->>SettingsPaneGeneral.xaml: Opens General Settings
    SettingsPaneGeneral.xaml->>ViewModel: Bind ShouldUsePinyin
    alt ShouldUsePinyin is true
        SettingsPaneGeneral.xaml->>SettingsPaneGeneral.xaml: Show "ShouldUseDoublePinyin" card
    else ShouldUsePinyin is false
        SettingsPaneGeneral.xaml->>SettingsPaneGeneral.xaml: Hide "ShouldUseDoublePinyin" card
    end
Loading

Possibly related PRs

  • Flow-Launcher/Flow.Launcher#2427: Implements Double Pinyin support including settings and UI integration, related to the visibility control added here.
  • Flow-Launcher/Flow.Launcher#3829: Refactors the double pinyin panel layout and modifies related UI visibility bindings, indicating changes to the same UI area.
  • Flow-Launcher/Flow.Launcher#3830: Modifies the implementation and change notification of the "ShouldUsePinyin" property and related reload logic, directly related to the property controlling visibility here.

Suggested reviewers

  • VictoriousRaptor
  • jjw24
  • taooceros
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai bot added the enhancement New feature or request label Jul 14, 2025

This comment has been minimized.

Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

❌ Errors and Warnings Count
❌ forbidden-pattern 13
⚠️ non-alpha-in-dictionary 2

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
Flow.Launcher.Test/ChineseDetectionPerformanceTest.cs (1)

66-72: Consider using modern NUnit assertion syntax.

The tests use ClassicAssert from the legacy namespace. Consider migrating to the modern constraint-based syntax for better readability and consistency with current NUnit best practices.

For example, replace:

-ClassicAssert.IsFalse(ContainsChinese("Hello World"), "Pure English should return false");
+Assert.That(ContainsChinese("Hello World"), Is.False, "Pure English should return false");
-ClassicAssert.AreEqual(wordsHelperResult, containsChineseResult,
-    $"Results differ for string: '{testString}'. WordsHelper: {wordsHelperResult}, ContainsChinese: {containsChineseResult}");
+Assert.That(containsChineseResult, Is.EqualTo(wordsHelperResult),
+    $"Results differ for string: '{testString}'. WordsHelper: {wordsHelperResult}, ContainsChinese: {containsChineseResult}");

Also applies to: 78-84, 95-96

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50be508 and 970aa5e.

📒 Files selected for processing (2)
  • Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1 hunks)
  • Flow.Launcher.Test/ChineseDetectionPerformanceTest.cs (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • Flow.Launcher.Infrastructure/UserSettings/Settings.cs
🧰 Additional context used
🪛 GitHub Check: Check Spelling
Flow.Launcher.Test/ChineseDetectionPerformanceTest.cs

[warning] 141-141:
Finalizers is not a recognized word. (unrecognized-spelling)


[warning] 6-6:
NUnit is not a recognized word. (unrecognized-spelling)

🪛 GitHub Actions: Check Spelling
Flow.Launcher.Test/ChineseDetectionPerformanceTest.cs

[warning] 6-6: Spell check warning: NUnit is not a recognized word. (unrecognized-spelling)


[warning] 141-141: Spell check warning: Finalizers is not a recognized word. (unrecognized-spelling)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: gitStream workflow automation
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: build
🔇 Additional comments (1)
Flow.Launcher.Test/ChineseDetectionPerformanceTest.cs (1)

12-61: LGTM! Well-structured test class with comprehensive test data.

The test data covers all important scenarios including pure English, pure Chinese, mixed content, edge cases, and performance testing strings.

@VictoriousRaptor VictoriousRaptor merged commit 50e570e into dev Jul 14, 2025
11 of 15 checks passed
@VictoriousRaptor VictoriousRaptor deleted the tweak-double-pin-pane branch July 14, 2025 13:43
@jjw24 jjw24 removed enhancement New feature or request 20 min review labels Jul 15, 2025
@jjw24 jjw24 added this to the 2.0.0 milestone Jul 15, 2025
@jjw24 jjw24 changed the title Hide double pin card when use pinyin is false Hide double pin card when use pinyin is false & additional tests Jul 15, 2025
Copy link

gitstream-cm bot commented Jul 15, 2025

🥷 Code experts: Jack251970, onesounds

VictoriousRaptor, Jack251970 have most 👩‍💻 activity in the files.
Jack251970, VictoriousRaptor have most 🧠 knowledge in the files.

See details

.github/actions/spelling/expect.txt

Activity based on git-commit:

VictoriousRaptor Jack251970
JUL 10 additions & 0 deletions
JUN
MAY
APR
MAR
FEB

Knowledge based on git-blame:
VictoriousRaptor: 27%

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Activity based on git-commit:

VictoriousRaptor Jack251970
JUL 22 additions & 7 deletions 44 additions & 4 deletions
JUN 28 additions & 2 deletions 4 additions & 2 deletions
MAY 86 additions & 30 deletions
APR 34 additions & 83 deletions
MAR 1 additions & 1 deletions 142 additions & 94 deletions
FEB 10 additions & 4 deletions

Knowledge based on git-blame:
Jack251970: 34%
VictoriousRaptor: 18%

Flow.Launcher.Test/ChineseDetectionPerformanceTest.cs

Activity based on git-commit:

VictoriousRaptor Jack251970
JUL 265 additions & 0 deletions
JUN
MAY
APR
MAR
FEB

Knowledge based on git-blame:
VictoriousRaptor: 100%

Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml

Activity based on git-commit:

VictoriousRaptor Jack251970
JUL 40 additions & 10 deletions 20 additions & 27 deletions
JUN 26 additions & 14 deletions
MAY 62 additions & 11 deletions
APR 11 additions & 8 deletions
MAR 44 additions & 20 deletions
FEB 1 additions & 1 deletions

Knowledge based on git-blame:
Jack251970: 21%
VictoriousRaptor: 3%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dev branch only An issue or fix for the Dev branch build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants